
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="../assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="../css/style.css"/>       
        <link href="../assets/css/codemirror.css" rel="stylesheet">
        <link rel="stylesheet" href="../assets/css/ace.min.css" />
        <link rel="stylesheet" href="../assets/css/font-awesome.min.css" />
          <script src="js/jquery-1.9.1.min.js"></script>
		<script type="text/javascript">
			window.jQuery || document.write("<script src='../assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>
       <script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='../assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="../assets/js/bootstrap.min.js"></script>
		<script src="../assets/js/typeahead-bs2.min.js"></script>
		<!-- page specific plugin scripts -->
		<script src="../assets/js/jquery.dataTables.min.js"></script>
		<script src="../assets/js/jquery.dataTables.bootstrap.js"></script>
        <script type="text/javascript" src="../js/H-ui.js"></script> 
        <script type="text/javascript" src="../js/H-ui.admin.js"></script> 
        <script src="../assets/layer/layer.js" type="text/javascript" ></script>
        <script src="../assets/laydate/laydate.js" type="text/javascript"></script>
		<script src="../js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
 
  
  
  function weitongguo(){
  				var a = $("input[type='checkbox']:checked").length;

										
										if (a == 1) {

											obj = document
													.getElementsByName("ace");
											check_val = [];
											for (k in obj) {
												if (obj[k].checked)
													check_val
															.push(obj[k].value);
											}
											
											id=check_val;
							

									

											if (id == null || id == "") {
												alert("请选择编号");
											} else {
                                             
                                             
                                           alert(11);
                                            
                                            var state = document
														.getElementById("st"
																+ id).innerText;
											alert(state);
											if(state=='已通过' || state=='未通过'){
											alert("已审核不可重复审核");
											
								
											}else{
											
											 window.location.href = "../change/weitongguo.do?id="+id;
									}
											
											
											}
										} else {
											alert("该操作只能选中一个");

										}
  			
  			
  			
  			
  			
  			
  			
  			}					
  
  
  
  
  	function tongguo() {

						var a = $("input[type='checkbox']:checked").length;

										
										if (a == 1) {

											obj = document
													.getElementsByName("ace");
											check_val = [];
											for (k in obj) {
												if (obj[k].checked)
													check_val
															.push(obj[k].value);
											}
											
											id=check_val;
							

									

											if (id == null || id == "") {
												alert("请选择编号");
											} else {
                                             
                                           
                                             var state = document
														.getElementById("st"
																+ id).innerText;
											
											if(state=='已通过' || state=='未通过'){
											alert("已审核不可重复审核");
											
								
											}else{
											
                                            
											 window.location.href = "../change/tongguo.do?id="+id;
									
											}
											
											}
										} else {
											alert("该操作只能选中一个");

										}
  			
  			
  			
  			
  			
  			
				
				}		
									
  
  
  

</script>






<title>审核列表</title>
</head>

<body>
<div class="page-content clearfix">
    <div id="Member_Ratings">
      <div class="d_Confirm_Order_style">
   
     <div class="border clearfix">
      
       <span> 
        <a onclick="tongguo()"  class="btn btn-warning">通过</a>
       <a onclick="weitongguo()" class="btn btn-xs btn-success"><i class="fa fa-check  bigger-120">不通过</i></a>  
        </span>  
     </div>
    <form name="ff">
     
       <table class="table table-striped table-bordered table-hover" id="sample-table">
		<thead>
		 <tr>
				<th width="25"><label><input type="checkbox" class="ace" name="ace" value=""><span class="lbl"></span></label></th>
				<th width="80">编号</th>
				<th width="80">合同编号</th>
				<th width="80">订单编号</th>
				<th width="100">房间编号</th>
				<th width="100">换房编号</th>
				<th width="80">客户姓名</th>
				<th width="80">落户姓名</th>
				<th width="80">业务员编号</th>
				<th width="80">业务员名称</th>
				<th width="50">变更类型</th>	
			</tr>
		</thead>
	<tbody>

		
		<c:forEach items="${list}" var="l">
		<tr id="t${l.id}">
          <td><label><input type="checkbox" class="ace"  name="ace" value="${l.id}"><span class="lbl"></span></label></td>
            <td>${l.id}</td>
          <td>${l.bid}</td>
          <td>${l.iid}</td>
          <td>${l.room}</td>
          <td>${l.complex}#${l.unit}#${l.roomname}</td>
           <td>${l.cname}</td>
            <td>${l.newcname}</td>
            <td>${l.uid}</td>
             <td>${l.uname}</td>
           <td id="st${l.id}">${l.state}</td>
         
		</tr> 
		
		</c:forEach>
		
		
		<c:forEach items="${list1}" var="l">
		<tr id="t${l.id}">
          <td><label><input type="checkbox" class="ace"  name="ace" value="${l.id}"><span class="lbl"></span></label></td>
            <td>${l.id}</td>
          <td>${l.bid}</td>
          <td>${l.iid}</td>
          <c:if test="${l.newcname==null}">
          <td>${l.room}</td>
          <td>${l.complex}#${l.unit}#${l.roomname}</td>
          </c:if>
           <c:if test="${l.newcname!=null}">
          <td>${l.complex}#${l.unit}#${l.roomname}</td>
           <td>${l.newroomid}</td>
          </c:if>
           <td>${l.cname}</td>
            <td>${l.newcname}</td>
            <td>${l.uid}</td>
             <td>${l.uname}</td>
           <td id="st${l.id}">${l.state}</td>
         
		</tr> 
		
		</c:forEach>
		
		
      </tbody>
	</table>
	</form>
   </div>
  </div>
 </div>

</body>


</html>




